<html>
<head><meta charset="utf-8"><title>Excessive Build Requirements · project-portable-simd · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/index.html">project-portable-simd</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html">Excessive Build Requirements</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211362721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211362721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211362721">(Sep 26 2020 at 14:32)</a>:</h4>
<p>As <span class="user-mention" data-user-id="133247">@bjorn3</span> pointed out in the <a href="https://github.com/rust-lang/rust/issues/2">#2</a> PR: the build times <em>just declaring the type basics</em> are already super high. And the RAM usage is also much higher than one would like. They reported 3GB of RAM used, I observed 1GB used on my own system, but we're only talking about <code>cargo check</code> of a single crate which is supposed to be a <em>portion</em> of <code>core</code>, not some sprawling 400 dep project.</p>
<p>So there's already some chatter in the PR thread about it, but it seems worth noting here too.</p>



<a name="211362925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211362925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211362925">(Sep 26 2020 at 14:36)</a>:</h4>
<p>A big jump seems to come from dead checking:</p>
<div class="codehilite"><pre><span></span><code>time: 0.000; rss: 953MB layout_testing
time: 27.495; rss: 1712MB       death_checking
</code></pre></div>



<a name="211362995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211362995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211362995">(Sep 26 2020 at 14:38)</a>:</h4>
<p>That only happens in incremental mode, so I guess it is from loading the dep graph or something like that.</p>



<a name="211363162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211363162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211363162">(Sep 26 2020 at 14:42)</a>:</h4>
<p>when i checked on my rpi4, it took as long (49s) to <code>cargo check</code> a fresh <code>stdsimd</code> as it did to do a fresh build of a "hello world" gba rom, but the gba rom is including the build-std step which builds <code>compiler_builtins</code> and <code>core</code>, and then linking and all that.</p>
<p>So that's a poor time.</p>



<a name="211365828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211365828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211365828">(Sep 26 2020 at 15:40)</a>:</h4>
<p>I wonder if stdarch has the same problem? They have the same types as far as I know</p>



<a name="211365915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211365915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211365915">(Sep 26 2020 at 15:42)</a>:</h4>
<p>You mean packed-simd? That one also has terrible compilation times and memory usage: <a href="https://github.com/rust-lang/rust/issues/76647">https://github.com/rust-lang/rust/issues/76647</a></p>



<a name="211366025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211366025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211366025">(Sep 26 2020 at 15:45)</a>:</h4>
<p>No, stdarch has similar types. However after a closer look there is no usize/isize or u128/i128 as expected</p>



<a name="211366044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211366044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211366044">(Sep 26 2020 at 15:45)</a>:</h4>
<p>And vectors are limited to 64 through 512 bits</p>



<a name="211366101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211366101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211366101">(Sep 26 2020 at 15:46)</a>:</h4>
<p>stdarch doesn't implement <code>Display</code> and things like that for those types.</p>



<a name="211366290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211366290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211366290">(Sep 26 2020 at 15:50)</a>:</h4>
<p>That's a good point</p>



<a name="211366894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211366894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211366894">(Sep 26 2020 at 16:02)</a>:</h4>
<p>Not sure if this would actually cut down on compilation time, but we can implement new types that implement many of the traits as long as the underlying types implement AsRef&lt;[T]&gt;</p>



<a name="211367175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211367175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211367175">(Sep 26 2020 at 16:08)</a>:</h4>
<p>That's similar to the method used by packed-simd, but the poor memory usage there seems to be a result of macro expansion, from what I can tell</p>



<a name="211370596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211370596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211370596">(Sep 26 2020 at 17:29)</a>:</h4>
<p>Stupid question--how do I display RSS?  <code>-Ztime-passes</code> only seems to print times for me</p>



<a name="211370642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211370642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211370642">(Sep 26 2020 at 17:30)</a>:</h4>
<p>Are you on Windows?</p>



<a name="211370648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211370648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211370648">(Sep 26 2020 at 17:30)</a>:</h4>
<p>nope, mac. though I guess that may be it</p>



<a name="211370669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211370669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211370669">(Sep 26 2020 at 17:31)</a>:</h4>
<p>On Unix systems it reads <code>/proc/self/statm</code>. <code>/proc</code> doesn't exist on macOS. <a href="https://github.com/rust-lang/rust/blob/956e06c6c85e918524b67503c4d65c7baf539585/compiler/rustc_data_structures/src/profiling.rs#L629">https://github.com/rust-lang/rust/blob/956e06c6c85e918524b67503c4d65c7baf539585/compiler/rustc_data_structures/src/profiling.rs#L629</a></p>



<a name="211370806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211370806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211370806">(Sep 26 2020 at 17:34)</a>:</h4>
<p>interesting--would have expected it to use getrusage</p>



<a name="211371111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211371111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211371111">(Sep 26 2020 at 17:42)</a>:</h4>
<p>Okay, well I was able to reproduce in docker.</p>
<div class="codehilite"><pre><span></span><code>time: 0.000; rss: 521MB encode_query_results_for(rustc_middle::ty::query::queries::unsafety_check_result)
time: 1.275; rss: 1583MB        encode_query_results_for(rustc_middle::ty::query::queries::typeck)
</code></pre></div>



<a name="211371115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211371115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211371115">(Sep 26 2020 at 17:42)</a>:</h4>
<p>this is where I see the jump (mine caps out at around 1.5GB)</p>



<a name="211371252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211371252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211371252">(Sep 26 2020 at 17:46)</a>:</h4>
<p>as a comparison, building core::arch caps out a bit over 400MB, for me</p>



<a name="211371714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211371714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211371714">(Sep 26 2020 at 17:57)</a>:</h4>
<p>Something interesting to note--removing the manually implemented traits does almost nothing to the memory usage, but removing the <code>derive</code>d traits dramatically reduces it</p>



<a name="211377713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Excessive%20Build%20Requirements/near/211377713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Excessive.20Build.20Requirements.html#211377713">(Sep 26 2020 at 19:26)</a>:</h4>
<p>I should have thought of that, there's been problems with the efficiency of <code>derive</code> stuff before in <code>winapi</code>.</p>
<p>good to have it fixed</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>